################################################################################
#
#               The Filibuster and Legislative Discussion
#
#                             Fu and Howell
#
#                                Nov 2022
#
################################################################################

library(tidyverse) 
library(data.table)
library(lubridate)
library(lfe)
library(stargazer)
library(ggthemes)

###################   Analysis 1: All Floor Speeches   #########################

### Raw Data Loading ###
setwd("~/Dropbox/FuHowell_Filibuster_Replication/data/")

# load description data
descr <- read_csv("descr.csv")

# load speaker data
speaker <- read_csv("speaker.csv")

# load senate minority party
min_party <- read_csv("min_party.csv")

# load congressional seats over time
seat <- read_csv("seat.csv")

# load cloture motion data
cloture <- read_csv("cloture.csv")

# load DW-NOMINATE scores
dw_nominate_raw <- read_csv("HSall_members_new.csv")

dw_nominate <- dw_nominate_raw %>%
  select(congress, chamber, state_abbrev, district_code, bioname, nominate_dim1) %>%
  mutate(state_abbrev = as.character(state_abbrev), 
         district_code = as.character(district_code)) %>%
  filter(chamber == "House" | chamber == "Senate") %>% 
  filter(congress >= 43 & congress <= 114)

dw_quantile <- dw_nominate %>%
  group_by(congress, chamber) %>%
  summarize(quantile25 = quantile(nominate_dim1, probs = 0.25, na.rm = T),
            quantile75 = quantile(nominate_dim1, probs = 0.75, na.rm = T))

dw_nominate_merge <- dw_nominate %>%
  mutate(bioname = toupper(bioname)) %>%
  mutate(lastname = str_split(bioname, ",", simplify = T)[,1]) %>%
  mutate(lastname = gsub("'", "", lastname)) %>%   # O'BRIEN
  mutate(lastname = gsub("Á", "A", lastname)) %>%  # FERNÁNEZ
  mutate(lastname = gsub("É", "E", lastname)) %>%  # GUTIÉRREZ
  mutate(lastname = gsub("Í", "I", lastname)) %>%  # MARTÍNES
  mutate(lastname = ifelse(bioname == "BONO, MARY", "BONO MACK", lastname)) %>%
  mutate(lastname = ifelse(bioname == "LONG, JILL LYNETTE", "LONG THOMPSON", lastname)) %>%
  left_join(dw_quantile) %>%
  mutate(ideology = ifelse(nominate_dim1 > quantile25 & nominate_dim1 < quantile75, "moderate", "extreme")) %>%
  mutate(chamber = ifelse(chamber == "Senate", "S", "H")) %>%
  select(congress, chamber, state = state_abbrev, district_code, bioname, lastname, nominate_dim1, ideology) %>%
  arrange(congress, chamber, district_code)

rm(dw_nominate_raw, dw_nominate, dw_quantile)



### Data Merging ###

# merging and filtering for both Senate and House
speech <- descr %>%
  filter(chamber == "S" | chamber == "H") %>%
  mutate(congress = as.numeric(congress) + 42) %>%
  select(-state, -gender) %>%
  left_join(speaker) %>%
  left_join(min_party) %>%
  select(-number_within_file, -line_start, -line_end, -file) %>%
  filter(!is.na(speakerid)) %>% 
  filter(nonvoting == "voting") %>% # drop all non-voting legislators
  filter(word_count >= 30) %>% # drop all non-substantive speeches
  mutate(speakerid2 = speakerid - congress * 1000000) %>% # create a speaker-specific id
  mutate(year = format(ymd(date), format = "%Y")) 

# Create legislator-by-year panel data
speech_panel <- speech %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, party, min_party_s, min_party_h, year, congress) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post1917S = ifelse(year >= 1917 & chamber == "S", 1, 0)) %>%
  mutate(post1975S = ifelse(year >= 1975 & chamber == "S", 1, 0)) %>%
  mutate(post2007S = ifelse(year >= 2007 & chamber == "S", 1, 0)) %>%
  mutate(post1889H = ifelse(year >= 1889 & congress != 52 & chamber == "H", 1, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber)) %>%
  mutate(min = ifelse(chamber == "S" & party == min_party_s, 1, 
               ifelse(chamber == "H" & party == min_party_h, 1, 0))) 

speech_panel2 <- speech_panel %>%
  left_join(dw_nominate_merge, by = c("congress", "chamber", "state", "lastname"))










### Visualization ###

# Figure A.1: Cloture Motions (1917-2020)
cloture %>%
  ggplot(aes(x = year, y = motion_filed)) +
  geom_line(size = 1, alpha = 0.75) +
  geom_vline(xintercept = 1917, color = "grey60") + 
  geom_vline(xintercept = 1975, color = "grey60") + 
  geom_vline(xintercept = 2007, color = "grey60") + 
  annotate(geom = "text", x = 1926, y = 20, label = "Cloture Adoption") +
  annotate(geom = "text", x = 1976, y = 70, label = "Cloture 2/3 to 3/5") +
  annotate(geom = "text", x = 2005, y = 270, label = "Filibuster Norm Change") +
  scale_x_continuous(breaks = c(1917, 1975, 2007)) +
  labs(x = "Year", y = "Cloture Motion Filed") +
  theme_few()

# Figure A.2: Average Logged Number of Words Spoken on the Floor per Legislator per Year
speech %>%
  filter(party == "D" | party == "R") %>%
  group_by(year, chamber, speakerid2) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word_count = log(word_count)) %>%
  group_by(chamber, year) %>%
  summarize(n = n(),
            word_count_ave = mean(word_count),
            log_word_count_ave = mean(log_word_count),
            log_word_count_sum = sum(log_word_count)) %>%
  mutate(year = as.numeric(year)) %>%
  mutate(chamber = ifelse(chamber == "H", "House", "Senate")) %>%
  left_join(seat) %>%
  mutate(chamber = factor(chamber, levels = c("Senate", "House"))) %>%
  mutate(log_word_count_ave2 = log_word_count_sum / seat) %>%
  filter(year > 1873) %>%
  ggplot(aes(x = year, y = log_word_count_ave2, color = chamber, shape = chamber)) +
  geom_vline(xintercept = 1889, color = "grey60") + 
  geom_vline(xintercept = 1917, color = "grey60") + 
  geom_vline(xintercept = 1975, color = "grey60") + 
  geom_vline(xintercept = 2007, color = "grey60") + 
  geom_point(alpha = 0.85, size = 2.5) +
  geom_smooth(method = "loess", se = F) +
  scale_shape_manual(values = c(16, 1)) +
  scale_color_manual(values = c("grey20", "grey50")) +
  scale_x_continuous(breaks = c(1889, 1917, 1975, 2007)) +
  labs(x = "Year", y = "Logged Word Counts") +
  theme_few()

# colored version
speech %>%
  filter(party == "D" | party == "R") %>%
  group_by(year, chamber, speakerid2) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word_count = log(word_count)) %>%
  group_by(chamber, year) %>%
  summarize(n = n(),
            word_count_ave = mean(word_count),
            log_word_count_ave = mean(log_word_count),
            log_word_count_sum = sum(log_word_count)) %>%
  mutate(year = as.numeric(year)) %>%
  mutate(chamber = ifelse(chamber == "H", "House", "Senate")) %>%
  left_join(seat) %>%
  mutate(chamber = factor(chamber, levels = c("Senate", "House"))) %>%
  mutate(log_word_count_ave2 = log_word_count_sum / seat) %>%
  filter(year > 1873) %>%
  ggplot(aes(x = year, y = log_word_count_ave2, color = chamber, shape = chamber)) +
  #  geom_vline(xintercept = 1889, color = "red", alpha = 0.7) + 
  geom_vline(xintercept = 1917, color = "grey") + 
  geom_vline(xintercept = 1975, color = "grey") + 
  geom_vline(xintercept = 2007, color = "grey") + 
  geom_point(alpha = 0.85, size = 2.5) +
  geom_smooth(method = "loess", se = F) +
  scale_shape_manual(values = c(1, 1)) +
  scale_color_manual(values = c("#1976D2", "#FF8F00")) +
  scale_x_continuous(breaks = c(1917, 1975, 2007)) +
  labs(x = "Year", y = "Logged Word Counts",
       title = "Average Logged Word Counts on the Floor per Legislator per Year",
       color = " ", shape = " ") +
  theme_few()


### Analysis ###

# Table 1: Congressional Floor Speech Length and Rule Changes on the Filibuster

# Cloture Adoption in 1917
mod1917_1 <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(64:65),])
mod1917_2 <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(63:66),])
mod1917_3 <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(62:67),])
mod1917_4 <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(61:68),])
mod1917_5 <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(60:69),])

stargazer(mod1917_1, mod1917_2, mod1917_3, mod1917_4, mod1917_5,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Change on Filibuster in 1917",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Adoption in 1917"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Cloture Reduction in 1975
mod1975_1 <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(93:94),])
mod1975_2 <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(92:95),])
mod1975_3 <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(91:96),])
mod1975_4 <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(90:97),])
mod1975_5 <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(89:98),])

stargazer(mod1975_1, mod1975_2, mod1975_3, mod1975_4, mod1975_5,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on Filibuster in 1975",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Reduction in 1975"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Norm Change in 2007 to Use Filibuster More Expansively
mod2007_1 <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(109:110),])
mod2007_2 <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(108:111),])
mod2007_3 <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(107:112),])
mod2007_4 <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(106:113),])
mod2007_5 <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(105:114),])

stargazer(mod2007_1, mod2007_2, mod2007_3, mod2007_4, mod2007_5,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Norm Change in 2007 to Use Filibuster More Expansively"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# House Disappearing Quorum Eliminated in 1889, 1893
mod1889_1 <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(50:51),])
mod1889_2 <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(49:52),])
mod1889_3 <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(48:53),])
mod1889_4 <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(47:54),])
mod1889_5 <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(46:55),])

stargazer(mod1889_1, mod1889_2, mod1889_3, mod1889_4, mod1889_5,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on House Filibuster in 1889",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("House Disappearing Quorum Eliminated in 1889, 1893"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))









### APPENDIX ###

# Table A.1: Unlogged Dependent Variable

# Cloture Adoption in 1917
mod1917_1_unlogged <- felm(word_count ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(64:65),])
mod1917_2_unlogged <- felm(word_count ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(63:66),])
mod1917_3_unlogged <- felm(word_count ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(62:67),])
mod1917_4_unlogged <- felm(word_count ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(61:68),])
mod1917_5_unlogged <- felm(word_count ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(60:69),])

stargazer(mod1917_1_unlogged, mod1917_2_unlogged, mod1917_3_unlogged, mod1917_4_unlogged, mod1917_5_unlogged,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          digits = 0,
          title = "Congressional Floor Speech Length and Rule Change on Filibuster in 1917",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Adoption in 1917"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Cloture Reduction in 1975
mod1975_1_unlogged <- felm(word_count ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(93:94),])
mod1975_2_unlogged <- felm(word_count ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(92:95),])
mod1975_3_unlogged <- felm(word_count ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(91:96),])
mod1975_4_unlogged <- felm(word_count ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(90:97),])
mod1975_5_unlogged <- felm(word_count ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(89:98),])

stargazer(mod1975_1_unlogged, mod1975_2_unlogged, mod1975_3_unlogged, mod1975_4_unlogged, mod1975_5_unlogged,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          digits = 0,
          title = "Congressional Floor Speech Length and Rule Changes on Filibuster in 1975",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Reduction in 1975"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Norm Change in 2007 to Use Filibuster More Expansively
mod2007_1_unlogged <- felm(word_count ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(109:110),])
mod2007_2_unlogged <- felm(word_count ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(108:111),])
mod2007_3_unlogged <- felm(word_count ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(107:112),])
mod2007_4_unlogged <- felm(word_count ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(106:113),])
mod2007_5_unlogged <- felm(word_count ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(105:114),])

stargazer(mod2007_1_unlogged, mod2007_2_unlogged, mod2007_3_unlogged, mod2007_4_unlogged, mod2007_5_unlogged,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          digits = 0,
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Norm Change in 2007 to Use Filibuster More Expansively"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# House Disappearing Quorum Eliminated in 1889, 1893
mod1889_1_unlogged <- felm(word_count ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(50:51),])
mod1889_2_unlogged <- felm(word_count ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(49:52),])
mod1889_3_unlogged <- felm(word_count ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(48:53),])
mod1889_4_unlogged <- felm(word_count ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(47:54),])
mod1889_5_unlogged <- felm(word_count ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(46:55),])

stargazer(mod1889_1_unlogged, mod1889_2_unlogged, mod1889_3_unlogged, mod1889_4_unlogged, mod1889_5_unlogged,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          digits = 0,
          title = "Congressional Floor Speech Length and Rule Changes on House Filibuster in 1889",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("House Disappearing Quorum Eliminated in 1889, 1893"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))


# Table A.2: Different Cut Points around 2007

## Use July 2007, Jan 2008, July 2008 as cut points

speech_panel_2008_1 <- speech %>%
  filter(date >= 20060101 & date < 20100101) %>%
  mutate(post2008 = ifelse(date >= 20080101, 1, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, party, min_party_s, min_party_h, year, post2008, congress) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2008S = ifelse(chamber == "S", post2008, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2008_2 <- speech %>%
  filter(date >= 20040101 & date < 20120101) %>%
  mutate(post2008 = ifelse(date >= 20080101, 1, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, party, min_party_s, min_party_h, year, post2008, congress) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2008S = ifelse(chamber == "S", post2008, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2008_3 <- speech %>%
  filter(date >= 20020101 & date < 20140101) %>%
  mutate(post2008 = ifelse(date >= 20080101, 1, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, party, min_party_s, min_party_h, year, post2008, congress) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2008S = ifelse(chamber == "S", post2008, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2008_4 <- speech %>%
  filter(date >= 20000101 & date < 20160101) %>%
  mutate(post2008 = ifelse(date >= 20080101, 1, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, party, min_party_s, min_party_h, year, post2008, congress) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2008S = ifelse(chamber == "S", post2008, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2008_5 <- speech %>%
  filter(date >= 19990101 & date < 20170101) %>%
  mutate(post2008 = ifelse(date >= 20080101, 1, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, party, min_party_s, min_party_h, year, post2008, congress) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2008S = ifelse(chamber == "S", post2008, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))


speech_panel_2007mid_1 <- speech %>%
  filter(date >= 20050701 & date < 20090701) %>%
  mutate(post2007mid = ifelse(date >= 20070701, 1, 0)) %>%
  mutate(year2 = case_when(date >= 20050701 & date < 20060701 ~ 1,
                           date >= 20060701 & date < 20070701 ~ 2,
                           date >= 20070701 & date < 20080701 ~ 3,
                           date >= 20080701 & date < 20090701 ~ 4)) %>%
  mutate(congress = round(year2 / 2, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, year2, congress, post2007mid) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2007midS = ifelse(chamber == "S", post2007mid, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2007mid_2 <- speech %>%
  filter(date >= 20030701 & date < 20110701) %>%
  mutate(post2007mid = ifelse(date >= 20070701, 1, 0)) %>%
  mutate(year2 = case_when(date >= 20030701 & date < 20040701 ~ 1,
                           date >= 20040701 & date < 20050701 ~ 2,
                           date >= 20050701 & date < 20060701 ~ 3,
                           date >= 20060701 & date < 20070701 ~ 4,
                           date >= 20070701 & date < 20080701 ~ 5,
                           date >= 20080701 & date < 20090701 ~ 6,
                           date >= 20090701 & date < 20100701 ~ 7,
                           date >= 20100701 & date < 20110701 ~ 8)) %>%
  mutate(congress = round(year2 / 2, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, year2, congress, post2007mid) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2007midS = ifelse(chamber == "S", post2007mid, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2007mid_3 <- speech %>%
  filter(date >= 20010701 & date < 20130701) %>%
  mutate(post2007mid = ifelse(date >= 20070701, 1, 0)) %>%
  mutate(year2 = case_when(date >= 20010701 & date < 20020701 ~ 1,
                           date >= 20020701 & date < 20030701 ~ 2,
                           date >= 20030701 & date < 20040701 ~ 3,
                           date >= 20040701 & date < 20050701 ~ 4,
                           date >= 20050701 & date < 20060701 ~ 5,
                           date >= 20060701 & date < 20070701 ~ 6,
                           date >= 20070701 & date < 20080701 ~ 7,
                           date >= 20080701 & date < 20090701 ~ 8,
                           date >= 20090701 & date < 20100701 ~ 9,
                           date >= 20100701 & date < 20110701 ~ 10,
                           date >= 20110701 & date < 20120701 ~ 11,
                           date >= 20120701 & date < 20130701 ~ 12)) %>%
  mutate(congress = round(year2 / 2, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, year2, congress, post2007mid) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2007midS = ifelse(chamber == "S", post2007mid, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2007mid_4 <- speech %>%
  filter(date >= 19990701 & date < 20150701) %>%
  mutate(post2007mid = ifelse(date >= 20070701, 1, 0)) %>%
  mutate(year2 = case_when(date >= 19990701 & date < 20000701 ~ 1,
                           date >= 20000701 & date < 20010701 ~ 2,
                           date >= 20010701 & date < 20020701 ~ 3,
                           date >= 20020701 & date < 20030701 ~ 4,
                           date >= 20030701 & date < 20040701 ~ 5,
                           date >= 20040701 & date < 20050701 ~ 6,
                           date >= 20050701 & date < 20060701 ~ 7,
                           date >= 20060701 & date < 20070701 ~ 8,
                           date >= 20070701 & date < 20080701 ~ 9,
                           date >= 20080701 & date < 20090701 ~ 10,
                           date >= 20090701 & date < 20100701 ~ 11,
                           date >= 20100701 & date < 20110701 ~ 12,
                           date >= 20110701 & date < 20120701 ~ 13,
                           date >= 20120701 & date < 20130701 ~ 14,
                           date >= 20130701 & date < 20140701 ~ 15,
                           date >= 20140701 & date < 20150701 ~ 16)) %>%
  mutate(congress = round(year2 / 2, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, year2, congress, post2007mid) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2007midS = ifelse(chamber == "S", post2007mid, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2007mid_5 <- speech %>%
  filter(date >= 19970701 & date < 20170701) %>%
  mutate(post2007mid = ifelse(date >= 20070701, 1, 0)) %>%
  mutate(year2 = case_when(date >= 19970701 & date < 19980701 ~ 1,
                           date >= 19980701 & date < 19990701 ~ 2,
                           date >= 19990701 & date < 20000701 ~ 3,
                           date >= 20000701 & date < 20010701 ~ 4,
                           date >= 20010701 & date < 20020701 ~ 5,
                           date >= 20020701 & date < 20030701 ~ 6,
                           date >= 20030701 & date < 20040701 ~ 7,
                           date >= 20040701 & date < 20050701 ~ 8,
                           date >= 20050701 & date < 20060701 ~ 9,
                           date >= 20060701 & date < 20070701 ~ 10,
                           date >= 20070701 & date < 20080701 ~ 11,
                           date >= 20080701 & date < 20090701 ~ 12,
                           date >= 20090701 & date < 20100701 ~ 13,
                           date >= 20100701 & date < 20110701 ~ 14,
                           date >= 20110701 & date < 20120701 ~ 15,
                           date >= 20120701 & date < 20130701 ~ 16,
                           date >= 20130701 & date < 20140701 ~ 17,
                           date >= 20140701 & date < 20150701 ~ 18,
                           date >= 20150701 & date < 20160701 ~ 19,
                           date >= 20160701 & date < 20170701 ~ 20)) %>%
  mutate(congress = round(year2 / 2, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, year2, congress, post2007mid) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2007midS = ifelse(chamber == "S", post2007mid, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))


speech_panel_2008mid_1 <- speech %>%
  filter(date >= 20060701 & date < 20100701) %>%
  mutate(post2008mid = ifelse(date >= 20080701, 1, 0)) %>%
  mutate(year2 = case_when(date >= 20060701 & date < 20070701 ~ 1,
                           date >= 20070701 & date < 20080701 ~ 2,
                           date >= 20080701 & date < 20090701 ~ 3,
                           date >= 20090701 & date < 20100701 ~ 4)) %>%
  mutate(congress = round(year2 / 2, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, year2, congress, post2008mid) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2008midS = ifelse(chamber == "S", post2008mid, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2008mid_2 <- speech %>%
  filter(date >= 20040701 & date < 20120701) %>%
  mutate(post2008mid = ifelse(date >= 20080701, 1, 0)) %>%
  mutate(year2 = case_when(date >= 20040701 & date < 20050701 ~ 1,
                           date >= 20050701 & date < 20060701 ~ 2,
                           date >= 20060701 & date < 20070701 ~ 3,
                           date >= 20070701 & date < 20080701 ~ 4,
                           date >= 20080701 & date < 20090701 ~ 5,
                           date >= 20090701 & date < 20100701 ~ 6,
                           date >= 20100701 & date < 20110701 ~ 7,
                           date >= 20110701 & date < 20120701 ~ 8)) %>%
  mutate(congress = round(year2 / 2, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, year2, congress, post2008mid) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2008midS = ifelse(chamber == "S", post2008mid, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2008mid_3 <- speech %>%
  filter(date >= 20020701 & date < 20140701) %>%
  mutate(post2008mid = ifelse(date >= 20080701, 1, 0)) %>%
  mutate(year2 = case_when(date >= 20020701 & date < 20030701 ~ 1,
                           date >= 20030701 & date < 20040701 ~ 2,
                           date >= 20040701 & date < 20050701 ~ 3,
                           date >= 20050701 & date < 20060701 ~ 4,
                           date >= 20060701 & date < 20070701 ~ 5,
                           date >= 20070701 & date < 20080701 ~ 6,
                           date >= 20080701 & date < 20090701 ~ 7,
                           date >= 20090701 & date < 20100701 ~ 8,
                           date >= 20100701 & date < 20110701 ~ 9,
                           date >= 20110701 & date < 20120701 ~ 10,
                           date >= 20120701 & date < 20130701 ~ 11,
                           date >= 20130701 & date < 20140701 ~ 12)) %>%
  mutate(congress = round(year2 / 2, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, year2, congress, post2008mid) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2008midS = ifelse(chamber == "S", post2008mid, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

speech_panel_2008mid_4 <- speech %>%
  filter(date >= 20000701 & date < 20160701) %>%
  mutate(post2008mid = ifelse(date >= 20080701, 1, 0)) %>%
  mutate(year2 = case_when(date >= 20000701 & date < 20010701 ~ 1,
                           date >= 20010701 & date < 20020701 ~ 2,
                           date >= 20020701 & date < 20030701 ~ 3,
                           date >= 20030701 & date < 20040701 ~ 4,
                           date >= 20040701 & date < 20050701 ~ 5,
                           date >= 20050701 & date < 20060701 ~ 6,
                           date >= 20060701 & date < 20070701 ~ 7,
                           date >= 20070701 & date < 20080701 ~ 8,
                           date >= 20080701 & date < 20090701 ~ 9,
                           date >= 20090701 & date < 20100701 ~ 10,
                           date >= 20100701 & date < 20110701 ~ 11,
                           date >= 20110701 & date < 20120701 ~ 12,
                           date >= 20120701 & date < 20130701 ~ 13,
                           date >= 20130701 & date < 20140701 ~ 14,
                           date >= 20140701 & date < 20150701 ~ 15,
                           date >= 20150701 & date < 20160701 ~ 16)) %>%
  mutate(congress = round(year2 / 2, 0)) %>%
  group_by(speakerid2, firstname, lastname, chamber, state, district, year2, congress, post2008mid) %>%
  summarize(word_count = sum(word_count)) %>%
  mutate(log_word = log(word_count)) %>%
  mutate(post2008midS = ifelse(chamber == "S", post2008mid, 0)) %>%
  mutate(congressXchamber = paste0(congress, chamber))

### Use Early 2007 as cut point 
# These models are the ones in the Table 1

stargazer(mod2007_1, mod2007_2, mod2007_3, mod2007_4, mod2007_5,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Early 2007 as the Cut Point"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))


### Use mid 2007 as cut point 
mod2007mid_1 <- felm(log_word ~ post2007midS + as.factor(year2) | speakerid2 | 0 | congressXchamber, data = speech_panel_2007mid_1)
mod2007mid_2 <- felm(log_word ~ post2007midS + as.factor(year2) | speakerid2 | 0 | congressXchamber, data = speech_panel_2007mid_2)
mod2007mid_3 <- felm(log_word ~ post2007midS + as.factor(year2) | speakerid2 | 0 | congressXchamber, data = speech_panel_2007mid_3)
mod2007mid_4 <- felm(log_word ~ post2007midS + as.factor(year2) | speakerid2 | 0 | congressXchamber, data = speech_panel_2007mid_4)
mod2007mid_5 <- felm(log_word ~ post2007midS + as.factor(year2) | speakerid2 | 0 | congressXchamber, data = speech_panel_2007mid_5)


stargazer(mod2007mid_1, mod2007mid_2, mod2007mid_3, mod2007mid_4, mod2007mid_5,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "4.5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Mid 2007 as the Cut Point "),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))


### Use early 2008 as cut point 
mod2008_1 <- felm(log_word ~ post2008S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel_2008_1)
mod2008_2 <- felm(log_word ~ post2008S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel_2008_2)
mod2008_3 <- felm(log_word ~ post2008S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel_2008_3)
mod2008_4 <- felm(log_word ~ post2008S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel_2008_4)
mod2008_5 <- felm(log_word ~ post2008S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel_2008_5)

stargazer(mod2008_1, mod2008_2, mod2008_3, mod2008_4, mod2008_5,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "4.5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Early 2008 as the Cut Point"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))



### Use mid 2008 as cut point 
mod2008mid_1 <- felm(log_word ~ post2008midS + as.factor(year2) | speakerid2 | 0 | congressXchamber, data = speech_panel_2008mid_1)
mod2008mid_2 <- felm(log_word ~ post2008midS + as.factor(year2) | speakerid2 | 0 | congressXchamber, data = speech_panel_2008mid_2)
mod2008mid_3 <- felm(log_word ~ post2008midS + as.factor(year2) | speakerid2 | 0 | congressXchamber, data = speech_panel_2008mid_3)
mod2008mid_4 <- felm(log_word ~ post2008midS + as.factor(year2) | speakerid2 | 0 | congressXchamber, data = speech_panel_2008mid_4)


stargazer(mod2008mid_1, mod2008mid_2, mod2008mid_3, mod2008mid_4,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions"), 
          column.separate = c(1, 1, 1, 1),
          dep.var.labels = c("Mid 2008 as the Cut Point "),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes")))




# Table A.3: Majority Party Only

# Cloture Adoption in 1917
mod1917_1_maj <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(64:65) & speech_panel$min == 0,])
mod1917_2_maj <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(63:66) & speech_panel$min == 0,])
mod1917_3_maj <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(62:67) & speech_panel$min == 0,])
mod1917_4_maj <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(61:68) & speech_panel$min == 0,])
mod1917_5_maj <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(60:69) & speech_panel$min == 0,])

stargazer(mod1917_1_maj, mod1917_2_maj, mod1917_3_maj, mod1917_4_maj, mod1917_5_maj,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Change on Filibuster in 1917",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Adoption in 1917"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Cloture Reduction in 1975
mod1975_1_maj <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(93:94) & speech_panel$min == 0,])
mod1975_2_maj <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(92:95) & speech_panel$min == 0,])
mod1975_3_maj <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(91:96) & speech_panel$min == 0,])
mod1975_4_maj <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(90:97) & speech_panel$min == 0,])
mod1975_5_maj <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(89:98) & speech_panel$min == 0,])

stargazer(mod1975_1_maj, mod1975_2_maj, mod1975_3_maj, mod1975_4_maj, mod1975_5_maj,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on Filibuster in 1975",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Reduction in 1975"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Norm Change in 2007 to Use Filibuster More Expansively
mod2007_1_maj <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(109:110) & speech_panel$min == 0,])
mod2007_2_maj <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(108:111) & speech_panel$min == 0,])
mod2007_3_maj <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(107:112) & speech_panel$min == 0,])
mod2007_4_maj <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(106:113) & speech_panel$min == 0,])
mod2007_5_maj <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(105:114) & speech_panel$min == 0,])

stargazer(mod2007_1_maj, mod2007_2_maj, mod2007_3_maj, mod2007_4_maj, mod2007_5_maj,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Norm Change in 2007 to Use Filibuster More Expansively"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# House Disappearing Quorum Eliminated in 1889, 1893
mod1889_1_maj <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(50:51) & speech_panel$min == 0,])
mod1889_2_maj <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(49:52) & speech_panel$min == 0,])
mod1889_3_maj <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(48:53) & speech_panel$min == 0,])
mod1889_4_maj <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(47:54) & speech_panel$min == 0,])
mod1889_5_maj <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(46:55) & speech_panel$min == 0,])

stargazer(mod1889_1_maj, mod1889_2_maj, mod1889_3_maj, mod1889_4_maj, mod1889_5_maj,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on House Filibuster in 1889",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("House Disappearing Quorum Eliminated in 1889, 1893"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Table A.4: Minority Party Only

# Cloture Adoption in 1917
mod1917_1_min <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(64:65) & speech_panel$min == 1,])
mod1917_2_min <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(63:66) & speech_panel$min == 1,])
mod1917_3_min <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(62:67) & speech_panel$min == 1,])
mod1917_4_min <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(61:68) & speech_panel$min == 1,])
mod1917_5_min <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(60:69) & speech_panel$min == 1,])

stargazer(mod1917_1_min, mod1917_2_min, mod1917_3_min, mod1917_4_min, mod1917_5_min,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Change on Filibuster in 1917",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Adoption in 1917"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Cloture Reduction in 1975
mod1975_1_min <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(93:94) & speech_panel$min == 1,])
mod1975_2_min <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(92:95) & speech_panel$min == 1,])
mod1975_3_min <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(91:96) & speech_panel$min == 1,])
mod1975_4_min <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(90:97) & speech_panel$min == 1,])
mod1975_5_min <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(89:98) & speech_panel$min == 1,])

stargazer(mod1975_1_min, mod1975_2_min, mod1975_3_min, mod1975_4_min, mod1975_5_min,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on Filibuster in 1975",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Reduction in 1975"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Norm Change in 2007 to Use Filibuster More Expansively
mod2007_1_min <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(109:110) & speech_panel$min == 1,])
mod2007_2_min <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(108:111) & speech_panel$min == 1,])
mod2007_3_min <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(107:112) & speech_panel$min == 1,])
mod2007_4_min <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(106:113) & speech_panel$min == 1,])
mod2007_5_min <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(105:114) & speech_panel$min == 1,])

stargazer(mod2007_1_min, mod2007_2_min, mod2007_3_min, mod2007_4_min, mod2007_5_min,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Norm Change in 2007 to Use Filibuster More Expansively"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# House Disappearing Quorum Eliminated in 1889, 1893
mod1889_1_min <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(50:51) & speech_panel$min == 1,])
mod1889_2_min <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(49:52) & speech_panel$min == 1,])
mod1889_3_min <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(48:53) & speech_panel$min == 1,])
mod1889_4_min <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(47:54) & speech_panel$min == 1,])
mod1889_5_min <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(46:55) & speech_panel$min == 1,])

stargazer(mod1889_1_min, mod1889_2_min, mod1889_3_min, mod1889_4_min, mod1889_5_min,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on House Filibuster in 1889",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("House Disappearing Quorum Eliminated in 1889, 1893"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))



# Table A.5: Democratic Party Only

# Cloture Adoption in 1917
mod1917_1_dem <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(64:65) & speech_panel$party == "D",])
mod1917_2_dem <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(63:66) & speech_panel$party == "D",])
mod1917_3_dem <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(62:67) & speech_panel$party == "D",])
mod1917_4_dem <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(61:68) & speech_panel$party == "D",])
mod1917_5_dem <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(60:69) & speech_panel$party == "D",])

stargazer(mod1917_1_dem, mod1917_2_dem, mod1917_3_dem, mod1917_4_dem, mod1917_5_dem,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Change on Filibuster in 1917",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Adoption in 1917"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Cloture Reduction in 1975
mod1975_1_dem <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(93:94) & speech_panel$party == "D",])
mod1975_2_dem <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(92:95) & speech_panel$party == "D",])
mod1975_3_dem <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(91:96) & speech_panel$party == "D",])
mod1975_4_dem <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(90:97) & speech_panel$party == "D",])
mod1975_5_dem <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(89:98) & speech_panel$party == "D",])

stargazer(mod1975_1_dem, mod1975_2_dem, mod1975_3_dem, mod1975_4_dem, mod1975_5_dem,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on Filibuster in 1975",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Reduction in 1975"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Norm Change in 2007 to Use Filibuster More Expansively
mod2007_1_dem <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(109:110) & speech_panel$party == "D",])
mod2007_2_dem <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(108:111) & speech_panel$party == "D",])
mod2007_3_dem <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(107:112) & speech_panel$party == "D",])
mod2007_4_dem <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(106:113) & speech_panel$party == "D",])
mod2007_5_dem <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(105:114) & speech_panel$party == "D",])

stargazer(mod2007_1_dem, mod2007_2_dem, mod2007_3_dem, mod2007_4_dem, mod2007_5_dem,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Norm Change in 2007 to Use Filibuster More Expansively"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# House Disappearing Quorum Eliminated in 1889, 1893
mod1889_1_dem <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(50:51) & speech_panel$party == "D",])
mod1889_2_dem <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(49:52) & speech_panel$party == "D",])
mod1889_3_dem <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(48:53) & speech_panel$party == "D",])
mod1889_4_dem <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(47:54) & speech_panel$party == "D",])
mod1889_5_dem <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(46:55) & speech_panel$party == "D",])

stargazer(mod1889_1_dem, mod1889_2_dem, mod1889_3_dem, mod1889_4_dem, mod1889_5_dem,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on House Filibuster in 1889",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("House Disappearing Quorum Eliminated in 1889, 1893"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Table A.6: Republican Party Only

# Cloture Adoption in 1917
mod1917_1_rep <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(64:65) & speech_panel$party == "R",])
mod1917_2_rep <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(63:66) & speech_panel$party == "R",])
mod1917_3_rep <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(62:67) & speech_panel$party == "R",])
mod1917_4_rep <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(61:68) & speech_panel$party == "R",])
mod1917_5_rep <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(60:69) & speech_panel$party == "R",])

stargazer(mod1917_1_rep, mod1917_2_rep, mod1917_3_rep, mod1917_4_rep, mod1917_5_rep,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Change on Filibuster in 1917",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Adoption in 1917"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Cloture Reduction in 1975
mod1975_1_rep <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(93:94) & speech_panel$party == "R",])
mod1975_2_rep <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(92:95) & speech_panel$party == "R",])
mod1975_3_rep <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(91:96) & speech_panel$party == "R",])
mod1975_4_rep <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(90:97) & speech_panel$party == "R",])
mod1975_5_rep <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(89:98) & speech_panel$party == "R",])

stargazer(mod1975_1_rep, mod1975_2_rep, mod1975_3_rep, mod1975_4_rep, mod1975_5_rep,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on Filibuster in 1975",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Reduction in 1975"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Norm Change in 2007 to Use Filibuster More Expansively
mod2007_1_rep <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(109:110) & speech_panel$party == "R",])
mod2007_2_rep <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(108:111) & speech_panel$party == "R",])
mod2007_3_rep <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(107:112) & speech_panel$party == "R",])
mod2007_4_rep <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(106:113) & speech_panel$party == "R",])
mod2007_5_rep <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(105:114) & speech_panel$party == "R",])

stargazer(mod2007_1_rep, mod2007_2_rep, mod2007_3_rep, mod2007_4_rep, mod2007_5_rep,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Norm Change in 2007 to Use Filibuster More Expansively"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# House Disappearing Quorum Eliminated in 1889, 1893
mod1889_1_rep <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(50:51) & speech_panel$party == "R",])
mod1889_2_rep <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(49:52) & speech_panel$party == "R",])
mod1889_3_rep <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(48:53) & speech_panel$party == "R",])
mod1889_4_rep <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(47:54) & speech_panel$party == "R",])
mod1889_5_rep <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel[speech_panel$congress %in% c(46:55) & speech_panel$party == "R",])

stargazer(mod1889_1_rep, mod1889_2_rep, mod1889_3_rep, mod1889_4_rep, mod1889_5_rep,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on House Filibuster in 1889",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("House Disappearing Quorum Eliminated in 1889, 1893"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))





# Table A.7: IDEOLOGY: moderate

# Cloture Adoption in 1917
mod1917_1_mod <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(64:65) & speech_panel2$ideology == "moderate",])
mod1917_2_mod <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(63:66) & speech_panel2$ideology == "moderate",])
mod1917_3_mod <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(62:67) & speech_panel2$ideology == "moderate",])
mod1917_4_mod <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(61:68) & speech_panel2$ideology == "moderate",])
mod1917_5_mod <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(60:69) & speech_panel2$ideology == "moderate",])

stargazer(mod1917_1_mod, mod1917_2_mod, mod1917_3_mod, mod1917_4_mod, mod1917_5_mod,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Change on Filibuster in 1917",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Adoption in 1917"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Cloture Reduction in 1975
mod1975_1_mod <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(93:94) & speech_panel2$ideology == "moderate",])
mod1975_2_mod <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(92:95) & speech_panel2$ideology == "moderate",])
mod1975_3_mod <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(91:96) & speech_panel2$ideology == "moderate",])
mod1975_4_mod <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(90:97) & speech_panel2$ideology == "moderate",])
mod1975_5_mod <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(89:98) & speech_panel2$ideology == "moderate",])

stargazer(mod1975_1_mod, mod1975_2_mod, mod1975_3_mod, mod1975_4_mod, mod1975_5_mod,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on Filibuster in 1975",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Reduction in 1975"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Norm Change in 2007 to Use Filibuster More Expansively
mod2007_1_mod <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(109:110) & speech_panel2$ideology == "moderate",])
mod2007_2_mod <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(108:111) & speech_panel2$ideology == "moderate",])
mod2007_3_mod <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(107:112) & speech_panel2$ideology == "moderate",])
mod2007_4_mod <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(106:113) & speech_panel2$ideology == "moderate",])
mod2007_5_mod <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(105:114) & speech_panel2$ideology == "moderate",])

stargazer(mod2007_1_mod, mod2007_2_mod, mod2007_3_mod, mod2007_4_mod, mod2007_5_mod,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Norm Change in 2007 to Use Filibuster More Expansively"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# House Disappearing Quorum Eliminated in 1889, 1893
mod1889_1_mod <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(50:51) & speech_panel2$ideology == "moderate",])
mod1889_2_mod <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(49:52) & speech_panel2$ideology == "moderate",])
mod1889_3_mod <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(48:53) & speech_panel2$ideology == "moderate",])
mod1889_4_mod <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(47:54) & speech_panel2$ideology == "moderate",])
mod1889_5_mod <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(46:55) & speech_panel2$ideology == "moderate",])

stargazer(mod1889_1_mod, mod1889_2_mod, mod1889_3_mod, mod1889_4_mod, mod1889_5_mod,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on House Filibuster in 1889",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("House Disappearing Quorum Eliminated in 1889, 1893"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))


# Table A.8: IDEOLOGY: extremist

# Cloture Adoption in 1917
mod1917_1_ext <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(64:65) & speech_panel2$ideology == "extreme",])
mod1917_2_ext <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(63:66) & speech_panel2$ideology == "extreme",])
mod1917_3_ext <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(62:67) & speech_panel2$ideology == "extreme",])
mod1917_4_ext <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(61:68) & speech_panel2$ideology == "extreme",])
mod1917_5_ext <- felm(log_word ~ post1917S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(60:69) & speech_panel2$ideology == "extreme",])

stargazer(mod1917_1_ext, mod1917_2_ext, mod1917_3_ext, mod1917_4_ext, mod1917_5_ext,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Change on Filibuster in 1917",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Adoption in 1917"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Cloture Reduction in 1975
mod1975_1_ext <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(93:94) & speech_panel2$ideology == "extreme",])
mod1975_2_ext <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(92:95) & speech_panel2$ideology == "extreme",])
mod1975_3_ext <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(91:96) & speech_panel2$ideology == "extreme",])
mod1975_4_ext <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(90:97) & speech_panel2$ideology == "extreme",])
mod1975_5_ext <- felm(log_word ~ post1975S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(89:98) & speech_panel2$ideology == "extreme",])

stargazer(mod1975_1_ext, mod1975_2_ext, mod1975_3_ext, mod1975_4_ext, mod1975_5_ext,
#          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on Filibuster in 1975",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Cloture Reduction in 1975"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# Norm Change in 2007 to Use Filibuster More Expansively
mod2007_1_ext <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(109:110) & speech_panel2$ideology == "extreme",])
mod2007_2_ext <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(108:111) & speech_panel2$ideology == "extreme",])
mod2007_3_ext <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(107:112) & speech_panel2$ideology == "extreme",])
mod2007_4_ext <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(106:113) & speech_panel2$ideology == "extreme",])
mod2007_5_ext <- felm(log_word ~ post2007S + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(105:114) & speech_panel2$ideology == "extreme",])

stargazer(mod2007_1_ext, mod2007_2_ext, mod2007_3_ext, mod2007_4_ext, mod2007_5_ext,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Norm Changes on Filibuster in 2007",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("Norm Change in 2007 to Use Filibuster More Expansively"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))

# House Disappearing Quorum Eliminated in 1889, 1893
mod1889_1_ext <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(50:51) & speech_panel2$ideology == "extreme",])
mod1889_2_ext <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(49:52) & speech_panel2$ideology == "extreme",])
mod1889_3_ext <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(48:53) & speech_panel2$ideology == "extreme",])
mod1889_4_ext <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(47:54) & speech_panel2$ideology == "extreme",])
mod1889_5_ext <- felm(log_word ~ post1889H + as.factor(year) | speakerid2 | 0 | congressXchamber, data = speech_panel2[speech_panel2$congress %in% c(46:55) & speech_panel2$ideology == "extreme",])

stargazer(mod1889_1_ext, mod1889_2_ext, mod1889_3_ext, mod1889_4_ext, mod1889_5_ext,
          type = "text", 
          omit = "factor", omit.stat = c("adj.rsq", "f", "ser"),
          title = "Congressional Floor Speech Length and Rule Changes on House Filibuster in 1889",
          dep.var.caption = c("Dependent Variable: Log Word Counts"),
          column.labels = c("1 session", "2 sessions", "3 sessions", "4 sessions", "5 sessions"), 
          column.separate = c(1, 1, 1, 1, 1),
          dep.var.labels = c("House Disappearing Quorum Eliminated in 1889, 1893"),
          add.lines = list(c("Legislator FE", "Yes", "Yes", "Yes", "Yes", "Yes"),
                           c("Year FE", "Yes", "Yes", "Yes", "Yes", "Yes")))




